.class public Lcom/bitauto/autoeasy/selectcar/Adapter/BrandListAdapter;
.super Lcom/bitauto/autoeasy/tool/ArrayListAdapter;
.source "BrandListAdapter.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/bitauto/autoeasy/selectcar/Adapter/BrandListAdapter$ViewHolder;
    }
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/bitauto/autoeasy/tool/ArrayListAdapter",
        "<",
        "Lcom/bitauto/autoeasy/selectcar/Object/Brand;",
        ">;"
    }
.end annotation


# instance fields
.field TAG:Ljava/lang/String;

.field imageView:Landroid/widget/ImageView;

.field private final prefix:Ljava/lang/String;


# direct methods
.method public constructor <init>(Landroid/app/Activity;)V
    .locals 1
    .parameter "context"

    .prologue
    .line 23
    invoke-direct {p0, p1}, Lcom/bitauto/autoeasy/tool/ArrayListAdapter;-><init>(Landroid/app/Activity;)V

    .line 28
    const-string v0, "\u7ecf\u9500\u5546\u62a5\u4ef7: "

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandListAdapter;->prefix:Ljava/lang/String;

    .line 29
    const-string v0, "BrandListAdapter"

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandListAdapter;->TAG:Ljava/lang/String;

    .line 25
    return-void
.end method


# virtual methods
.method public getItemId(I)J
    .locals 2
    .parameter "position"

    .prologue
    .line 43
    const-wide/16 v0, 0x0

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 9
    .parameter "position"
    .parameter "convertView"
    .parameter "parent"

    .prologue
    const/4 v7, 0x0

    const/high16 v6, 0x7f0b

    const v8, 0x7f020008

    .line 48
    move-object v3, p2

    .line 49
    .local v3, root:Landroid/view/View;
    new-instance v1, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandListAdapter$ViewHolder;

    invoke-direct {v1, p0}, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandListAdapter$ViewHolder;-><init>(Lcom/bitauto/autoeasy/selectcar/Adapter/BrandListAdapter;)V

    .line 50
    .local v1, holder:Lcom/bitauto/autoeasy/selectcar/Adapter/BrandListAdapter$ViewHolder;
    iget-object v5, p0, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandListAdapter;->mContext:Landroid/app/Activity;

    invoke-virtual {v5}, Landroid/app/Activity;->getLayoutInflater()Landroid/view/LayoutInflater;

    move-result-object v2

    .line 52
    .local v2, inflater:Landroid/view/LayoutInflater;
    invoke-virtual {p0, p1}, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandListAdapter;->getItem(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/bitauto/autoeasy/selectcar/Object/Brand;

    .line 54
    .local v0, brand:Lcom/bitauto/autoeasy/selectcar/Object/Brand;
    invoke-virtual {p0, p1}, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandListAdapter;->isEnabled(I)Z

    move-result v5

    if-eqz v5, :cond_3

    .line 56
    const v5, 0x7f030004

    invoke-virtual {v2, v5, v7}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v3

    .line 57
    invoke-virtual {v3, v6}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v5

    check-cast v5, Landroid/widget/TextView;

    iput-object v5, v1, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandListAdapter$ViewHolder;->name:Landroid/widget/TextView;

    .line 58
    const v5, 0x7f0b0003

    invoke-virtual {v3, v5}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v5

    check-cast v5, Landroid/widget/TextView;

    iput-object v5, v1, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandListAdapter$ViewHolder;->price:Landroid/widget/TextView;

    .line 59
    const v5, 0x7f0b0001

    invoke-virtual {v3, v5}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v5

    check-cast v5, Lcom/bitauto/autoeasy/widget/RemoteImageView;

    iput-object v5, v1, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandListAdapter$ViewHolder;->imageView:Lcom/bitauto/autoeasy/widget/RemoteImageView;

    .line 61
    invoke-virtual {v0}, Lcom/bitauto/autoeasy/selectcar/Object/Brand;->getImage()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/String;->length()I

    move-result v5

    if-lez v5, :cond_2

    .line 62
    iget-object v5, v1, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandListAdapter$ViewHolder;->name:Landroid/widget/TextView;

    invoke-virtual {v0}, Lcom/bitauto/autoeasy/selectcar/Object/Brand;->getEName()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 63
    const-string v5, "0"

    invoke-virtual {v0}, Lcom/bitauto/autoeasy/selectcar/Object/Brand;->getMinValue()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-nez v5, :cond_0

    const-string v5, ""

    invoke-virtual {v0}, Lcom/bitauto/autoeasy/selectcar/Object/Brand;->getMinValue()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_1

    .line 64
    :cond_0
    iget-object v5, v1, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandListAdapter$ViewHolder;->price:Landroid/widget/TextView;

    const-string v6, "\u7ecf\u9500\u5546\u62a5\u4ef7: \u6682\u65e0"

    invoke-virtual {v5, v6}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 68
    :goto_0
    iget-object v5, v1, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandListAdapter$ViewHolder;->imageView:Lcom/bitauto/autoeasy/widget/RemoteImageView;

    invoke-static {v8}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v6

    invoke-virtual {v5, v6}, Lcom/bitauto/autoeasy/widget/RemoteImageView;->setDefaultImage(Ljava/lang/Integer;)V

    .line 69
    iget-object v6, v1, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandListAdapter$ViewHolder;->imageView:Lcom/bitauto/autoeasy/widget/RemoteImageView;

    iget-object v5, p0, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandListAdapter;->mList:Ljava/util/ArrayList;

    invoke-virtual {v5, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Lcom/bitauto/autoeasy/selectcar/Object/Brand;

    invoke-virtual {v5}, Lcom/bitauto/autoeasy/selectcar/Object/Brand;->getImage()Ljava/lang/String;

    move-result-object v5

    .line 70
    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandListAdapter;->getListView()Landroid/widget/ListView;

    move-result-object v7

    .line 69
    invoke-virtual {v6, v5, p1, v7}, Lcom/bitauto/autoeasy/widget/RemoteImageView;->setImageUrl(Ljava/lang/String;ILandroid/widget/ListView;)V

    .line 82
    :goto_1
    invoke-virtual {v3, v1}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    .line 84
    return-object v3

    .line 66
    :cond_1
    iget-object v5, v1, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandListAdapter$ViewHolder;->price:Landroid/widget/TextView;

    new-instance v6, Ljava/lang/StringBuilder;

    const-string v7, "\u7ecf\u9500\u5546\u62a5\u4ef7: "

    invoke-direct {v6, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Lcom/bitauto/autoeasy/selectcar/Object/Brand;->getMinValue()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    const-string v7, "\u4e07 ~ "

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v0}, Lcom/bitauto/autoeasy/selectcar/Object/Brand;->getMaxValue()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    const-string v7, "\u4e07"

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_0

    .line 72
    :cond_2
    iget-object v5, v1, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandListAdapter$ViewHolder;->name:Landroid/widget/TextView;

    invoke-virtual {v0}, Lcom/bitauto/autoeasy/selectcar/Object/Brand;->getEName()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 73
    iget-object v5, v1, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandListAdapter$ViewHolder;->price:Landroid/widget/TextView;

    const-string v6, "\u672a\u4e0a\u5e02"

    invoke-virtual {v5, v6}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 74
    iget-object v5, v1, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandListAdapter$ViewHolder;->imageView:Lcom/bitauto/autoeasy/widget/RemoteImageView;

    invoke-virtual {v5, v8}, Lcom/bitauto/autoeasy/widget/RemoteImageView;->setBackgroundResource(I)V

    goto :goto_1

    .line 77
    :cond_3
    const v5, 0x7f030003

    invoke-virtual {v2, v5, v7}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v3

    .line 78
    invoke-virtual {v3, v6}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/TextView;

    .line 79
    .local v4, textView:Landroid/widget/TextView;
    invoke-virtual {v0}, Lcom/bitauto/autoeasy/selectcar/Object/Brand;->getName()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_1
.end method

.method public isEnabled(I)Z
    .locals 2
    .parameter "position"

    .prologue
    .line 33
    iget-object v1, p0, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandListAdapter;->mList:Ljava/util/ArrayList;

    invoke-virtual {v1, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object p0

    .end local p0
    check-cast p0, Lcom/bitauto/autoeasy/selectcar/Object/Brand;

    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/Object/Brand;->getImage()Ljava/lang/String;

    move-result-object v0

    .line 34
    .local v0, url:Ljava/lang/String;
    const-string v1, "SerialList"

    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 35
    const/4 v1, 0x0

    .line 37
    :goto_0
    return v1

    :cond_0
    const/4 v1, 0x1

    goto :goto_0
.end method
